{% extends 'based.html' %}

{% block body %}
<div id="doc" class="yui-t7">
   <div id="hd"><a href="/"><img src="/static/banner.png" border=0></a>
<h1>E-allert list and form</h1></div>
   <div id="bd">
	<div class="yui-g">
    <div class="yui-u first">
    <form enctype="multipart/form-data" method="post" action="/allert">
  <table>
  {{ form.as_table }}
  <tr><th><label for="id_img">Photo:</label></th><td><input type="file" id="id_img" name="img"/></td></tr>
  </table>
<input type="submit" value=" allert"/>
</form>
	</div>
    <div class="yui-u">
      <div id="div_id_geo_pos" style="width: 300px; height: 300px"></div>
	</div>
</div>
    <div class="yui-g">
<table cellspacing="0" class="allerts" id="timeline">
  <tbody id="timeline_body">
{% for allert in allert_list %}
    <tr class="hallert" id="allert">
      <td class="thumb photo">
        {% if allert.picture %}
            <a href="/pic_view?k={{ allert.key }}" class="pic_url">
              <img src="/thumb?k={{ allert.key }}" border="0">
            </a>
        {% else %}
          <img src="/static/noimage.jpg">
        {% endif %}
      </td>
      <td class="allert-sender">
        {% if allert.sender %}
          <a href="/allert?k={{ allert.key }}" class="url">
            <b>{{ allert.sender.nickname }} wrote:</b>
          </a>
        {% else %}
          <a href="/allert?k={{ allert.key }}" class="url">
            An anonymous person wrote:
          </a>
        {% endif %}
      </td>
      <td class="allert-body">
        <div>
          <blockquote>
            <a href="/allert?k={{ allert.key }}" class="url">
              {{ allert.description|escape }}
            </a>
          </blockquote>
        </div>
      </td>
      <td class="allert-map">
        <div>
          <a class="show-map" href="/map?k={{ allert.key }}" id="maps_link" title="Show Map">
            Click to view the map.
          </a>
        </div>
      </td>
    </tr>
{% endfor %}
  </tbody>
</table>
	</div>

	</div>
    <div id="ft"></div>
<div style="float:right" >
<div class="pagination">
    <span class="step-links">
        {% if has_previous  %}
            <a href="?page={{ previous_page }}">previous</a>
        {% else %}
            <a><em>previous</em></a>
        {% endif %}
        &nbsp;|&nbsp;
        <span class="current">
            <small> Page {{ page_number }} of {{ num_pages }}</small>
        </span>
        &nbsp;|&nbsp;
        {% if has_next %}
            <a href="?page={{ next_page }}">next</a>
        {% else %}
            <a><em>next</em></a>&nbsp;
        {% endif %}
    </span>
</div>
</div>
    </div>
{% endblock %}



